From 17f4b0069273f9c9877dc079e5cf49ed9cb4d278 Mon Sep 17 00:00:00 2001 From: Justin Burkett Date: Sun, 6 Nov 2016 12:50:55 -0500 Subject: [PATCH] Move sort after filter op in --get-formatted-key-bindings --- which-key.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/which-key.el b/which-key.el index 2a37da3c89b..4f77379f451 100644 --- a/which-key.el +++ b/which-key.el @@ -1502,9 +1502,6 @@ alists. Returns a list (key separator description)." "Uses `describe-buffer-bindings' to collect the key bindings in BUFFER that follow the key sequence KEY-SEQ." (let* ((unformatted (if bindings bindings (which-key--get-current-bindings)))) - (when which-key-sort-order - (setq unformatted - (sort unformatted which-key-sort-order))) (when which-key-binding-filter-function (setq unformatted (delq nil (mapcar @@ -1512,6 +1509,9 @@ BUFFER that follow the key sequence KEY-SEQ." (funcall which-key-binding-filter-function cell (which-key--current-key-string))) unformatted)))) + (when which-key-sort-order + (setq unformatted + (sort unformatted which-key-sort-order))) (which-key--format-and-replace unformatted))) ;;; Functions for laying out which-key buffer pages -- 2.30.2